<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWechatMediaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_media', function (Blueprint $table) {
            $table->id()->comment('微信回复表');
            $table->integer('key_id')->index()->comment('关键字');
            $table->string('media_id',255)->comment('微信服务器返回的id');
            $table->string('type',32)->comment('回复类型');
            $table->string('content',255)->comment('回复内容');
            $table->string('path',255)->comment('文件路径');
            $table->string('url',255)->comment('地址');
            $table->integer('temporary')->default(1)->comment('是否永久或者临时 0永久1临时');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_media');
    }
}
